﻿using System;
using System.Collections.Generic;
using System.Text;
using VietKinsNutrition.Common;
using System.Data;

namespace VietKinsNutrition.Common
{
    public class ThucphamtheobuaInfo
    {
        #region CONSTRUCTORS
        public ThucphamtheobuaInfo()
        {
            this.m_id = Util.NULL_INT;
            this.m_buaantrongngayId = Util.NULL_INT;
            this.m_khoilop = Util.NULL_INT;
            this.m_ngay = Util.NULL_DATETIME;
            this.m_thucpham_ThucanId = Util.NULL_INT;
            this.m_soluong = Util.NULL_STRING;
            this.m_dongia = Util.NULL_DOUBLE;
            this.m_dongiathucte = Util.NULL_DOUBLE;
        }
        public ThucphamtheobuaInfo(int id, int buaantrongngayId, int khoilop, DateTime ngay, int thucpham_ThucanId, string soluong, double dongia, double dongiathucte)
        {

            this.m_id = id;
            this.m_buaantrongngayId = buaantrongngayId;
            this.m_khoilop = khoilop;
            this.m_ngay = ngay;
            this.m_thucpham_ThucanId = thucpham_ThucanId;
            this.m_soluong = soluong;
            this.m_dongia = dongia;
            this.m_dongiathucte = dongiathucte;
        }
        public ThucphamtheobuaInfo(DataRow dRow)
        {

            this.m_id = (int)Util.ReplaceDBNullTo(dRow["id"], Util.NULL_INT);
            this.m_buaantrongngayId = (int)Util.ReplaceDBNullTo(dRow["buaantrongngayId"], Util.NULL_INT);
            this.m_khoilop = (int)Util.ReplaceDBNullTo(dRow["khoilop"], Util.NULL_INT);
            this.m_ngay = (DateTime)Util.ReplaceDBNullTo(dRow["ngay"], Util.NULL_DATETIME);
            this.m_thucpham_ThucanId = (int)Util.ReplaceDBNullTo(dRow["thucpham_ThucanId"], Util.NULL_INT);
            this.m_soluong = (string)Util.ReplaceDBNullTo(dRow["soluong"], Util.NULL_DOUBLE);
            this.m_dongia = (double)Util.ReplaceDBNullTo(dRow["dongia"], Util.NULL_DOUBLE);
            this.m_dongiathucte = (double)Util.ReplaceDBNullTo(dRow["dongiathucte"], Util.NULL_DOUBLE);
        }
        #endregion

        #region ATTRIBUTES
        private int m_id;
        private int m_buaantrongngayId;
        private int m_khoilop;
        private DateTime m_ngay;
        private int m_thucpham_ThucanId;
        private string m_soluong;
        private double m_dongia;
        private double m_dongiathucte;
        private int m_NamhocId;
        #endregion

        #region PROPERTIES
        public int Id
        {
            get
            {
                return this.m_id;
            }
            set
            {
                this.m_id = value;
            }
        }
        public int NamhocId
        {
            get
            {
                return this.m_NamhocId;
            }
            set
            {
                this.m_NamhocId = value;
            }
        }
        public int BuaantrongngayId
        {
            get
            {
                return this.m_buaantrongngayId;
            }
            set
            {
                this.m_buaantrongngayId = value;
            }
        }

        public int Khoilop
        {
            get
            {
                return this.m_khoilop;
            }
            set
            {
                this.m_khoilop = value;
            }
        }

        public DateTime Ngay
        {
            get
            {
                return this.m_ngay;
            }
            set
            {
                this.m_ngay = value;
            }
        }

        public int Thucpham_ThucanId
        {
            get
            {
                return this.m_thucpham_ThucanId;
            }
            set
            {
                this.m_thucpham_ThucanId = value;
            }
        }

        public string Soluong
        {
            get
            {
                return this.m_soluong;
            }
            set
            {
                this.m_soluong = value;
            }
        }

        public double Dongia
        {
            get
            {
                return this.m_dongia;
            }
            set
            {
                this.m_dongia = value;
            }
        }

        public double Dongiathucte
        {
            get
            {
                return this.m_dongiathucte;
            }
            set
            {
                this.m_dongiathucte = value;
            }
        }

        #endregion

    }
}
